<template>
  <div>
    <HeaderTitle title="@我的" />
    <Nmusic title="暂时还没收到@" />
    <div class="content">
      <div class="more" @click="getMsgForwards" v-if="more">加载更多</div>
    </div>
  </div>
</template>

<script>
import Nmusic from '@/components/nMusic'
import HeaderTitle from './HeaderTitle'
import {msgForwards} from '@/api'
  export default {
    name:'mymsg',
    components: {
      Nmusic,
      HeaderTitle,
    },
    data() {
      return {
        forwards:[],
        lasttime:null,
        more: false
      }
    },
    created () {
      this.init();
    },
    methods: {
      init() {
        this.getMsgForwards()
      },
      getMsgForwards(){
        msgForwards({
          limit: 30,
          offset: 0,
          lasttime: this.lasttime,
        }).then(data=>{
          console.log(data,"@我");
          this.more = data.more
          this.lasttime = data.lasttime
          this.forwards = this.forwards.concat(data.forwards)
        })
      }
    },
  }
</script>

<style lang="scss" scoped>
.more{
  text-align: center;
  font-size:12px;
  color:#999;
  cursor: pointer;
}
</style>